<!DOCTYPE html >
<html>
<head>
    <link rel="stylesheet" href="demos.css" type="text/css" media="screen" />
    
    <script src="../libraries/RGraph.common.core.js" ></script>
    <script src="../libraries/RGraph.common.key.js" ></script>
    <script src="../libraries/RGraph.common.effects.js" ></script>
    <script src="../libraries/RGraph.pie.js" ></script>
    <!--[if lt IE 9]><script src="../excanvas/excanvas.js"></script><![endif]-->

    <title>A "rectangular" Pie chart</title>
    
    <meta name="description" content="A rectangular Pie chart" />
</head>
<body>

    <h1>A "rectangular" Pie chart</h1>
    
    <p>
        By using a large chart.radius setting the Pie will be too large for the canvas and you'll get a rectangular Pie chart effect.
    </p>

    <canvas id="cvs" width="350" height="250" style="border: 1px solid #aaa">[No canvas support]</canvas>
    
    <script>
        window.onload = function ()
        {
            var pie = new RGraph.Pie('cvs', [4,8,4,6,5,3,2,5])
                .Set('radius', 350)
                .Set('key', ['Alvin','Pete','Hoolio','Jack','Kev','Luis','Lou','Jesse'])
                .Set('strokestyle', 'white')
                .Set('linewidth', 3)
            
            if (ISIE9UP || ISCHROME) {
                RGraph.Effects.Pie.RoundRobin(pie,null,addCenterPin);
                RGraph.Effects.Pie.Implode(pie);
            } else {
                addCenterPin();
                RGraph.Effects.Pie.Grow(pie);
            }
            
            function addCenterPin ()
            {
                pie.Set('centerpin', 7);
                pie.Set('centerpin.fill', 'gray');
                RGraph.Redraw();
            }
        }
    </script>

    <p>        
        <a href="./">&laquo; Back</a>
    </p>

</body>
</html>